package com.oracle.common;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @program: CampusMatching
 * @description:
 * @author: zhaolei
 * @create: 2020-07-25 16:31
 **/
//匹配模板方法
public abstract class TemplateMoudleMethod {

    public List list=null;

    //根据爱好匹配
    protected abstract Boolean getObjByHobby();

    //根据学校匹配
    protected  abstract  Boolean getObjBySchool();

    //根据出生日期匹配
    protected  abstract  Boolean getObjByBirthday();

    //自定义匹配
    protected abstract  Boolean getObjByself();

    public final List<Object> run(){
        if( this.getObjByHobby()){
            System.out.println("爱好配对成功");
            return  this.list;
        }else if(this.getObjBySchool()){
            System.out.println("学校配对成功");
            return  this.list;
        }else if(this.getObjByBirthday()){
            System.out.println("生日配对成功");
            return  this.list;
        }else if (this.getObjByself()){
            System.out.println("自定义配对成功");
            return  this.list;
        }else{
            return  this.list;
        }
    }

}
